<div class="col-lg-10">
    <?php $countCrumb = count($crumb); ?>
    <?php $i = 0; ?>
    <div class="row">
        <ol class="breadcrumb">
            <?php foreach($crumb as $key => $value) : ?>
                <?php $i++; ?>
                <?php if($i == $countCrumb) : ?>
                    <li class="active"><?=$key?></li>
                <?php else : ?>
                    <li><a href="<?=$value?>"><?=$key?></a></li>
                <?php endif ?>
            <?php  endforeach ?>
        </ol>
    </div>
    
	<div class="row">
		<?php if(count($listPeople)) : ?>
			<?php foreach($listPeople as $item) : ?>
			<div class="col-lg-2 item-person-in-list">
	            <div class="thumbnail" stype="width:110px; height:90px">
	            	<?php if($item['avatar'] !== null) : ?>
	                	<img data-src="<?php echo base_url() . $item['avatar'] ?>" src="<?php echo base_url() . $item['avatar'] ?>" stype="width:100px; height:80px" alt="">
	            	<?php else : ?>
	        			<img src="<?php echo base_url()?>public/image/NoImage.jpg" alt="">
	        		<?php endif ?>
	                <div class="caption">
	                    <a href="#"><?php echo $item['fullname']?></a>
	                    <?php if($this->session->userdata('sess_memId') == $infoPerson['member_id']) : ?>
	                    	<?php $link = base_url()."person/message?meid=2&meName=".urlencode($item['fullname']) ."&who=" .$item['id'];
	                    	?>
	                    	<a href="javascript:void(0)" onclick="show_pop_msg('<?=$link?>')" data-target="#modal_add_msg" data-toggle="modal" class="showTip tip" title="Send a message"><i class="icon-envelope"></i></a>
	                	<?php endif ?>
	                </div>
	            </div>
	        </div>
	    	<?php endforeach ?>
		<?php endif ?>
	</div>
</div><!--End row -->

<!-- Modal -->
  <div class="modal fade" id="modal_add_msg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">Send a message</h4>
        </div>
        <div class="modal-body">
        	<!-- <form class="form-horizontal">
         		<div class="form-group">
         			<label class="col-lg-2 control-label">From</label>
         			<div class="col-lg-10">
         				<p class="form-control-static">Me</p>
         			</div>
         		</div>
         		<div class="form-group">
         			<label class="col-lg-2 control-label">To</label>
         			<div class="col-lg-10">
         				<p class="form-control-static"><?=$item['fullname']?></p>
         			</div>
         		</div>
         		<div class="form-group">
         			<label class="col-lg-2 control-label">Subject</label>
         			<div class="col-lg-10">
         				<input type="text" id="subject" class="form-control">
         			</div>
         		</div>
         		<div class="form-group">
         			<label class="col-lg-2 control-label">Message</label>
         			<div class="col-lg-10">
         				<textarea id="msg_after" class="form-control"></textarea>
         			</div>
         		</div>
         	</form> -->
        </div>
        <!-- <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          <button type="button" class="btn btn-primary">Send</button>
        </div> -->
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->

<script type="text/javascript">
$(document).ready(function(){
	//$('.showTip').tooltip();
	//$('#modal_add_msg').modal();
})

function show_pop_msg(link) {
	var poster = $('#poster').val();
			$('body').on('hidden.bs.modal', '.modal', function () {
			    $(this).removeData('bs.modal');
			});
			$('#modal_add_msg').modal({
				remote: link
			});
		
}
</script>